import {
    createRouter,
    createMemoryHistory,
    // @ts-ignore
    createWebHashHistory,
    createWebHistory
} from "vue-router";

// @ts-ignore
import Home from "../views/Home/index.vue";
// @ts-ignore
import About from "../views/About/index.vue";

const isSSR = typeof window === "undefined";
const history = isSSR?createMemoryHistory():createWebHistory();
const routes = [{
    path:"/",
    name:Home,
    component:Home
},{
    path:"/about",
    name:About,
    component:About
}]

export default()=>createRouter({
    history,
    routes
})